package com.yjd.comm.merchant.service;

import com.yjd.comm.base.service.IBaseService;
import com.yjd.comm.funds.enums.FundsIncomeEnum;
import com.yjd.comm.merchant.enums.MerchantFundRefTabEnum;
import com.yjd.comm.merchant.enums.MerchantFundsTypeEnum;
import com.yjd.comm.merchant.model.MerchantFundsDataModel;

/**
 * <b>description</b>：商户资金流水表业务接口<br>
 * <b>time</b>：2017-10-19 15:50:08 <br>
 * <b>author</b>：  carl
 */
public interface IMerchantFundsDataService extends IBaseService {
	/**
	 * 插入
	 * 
	 * @param model
	 * @return
	 * @throws Exception
	 */
	public MerchantFundsDataModel insert(MerchantFundsDataModel model) throws Exception;

	/**
	 * 更新,大于等于1表示成功，其他失败
	 * 
	 * @param model
	 * @return
	 * @throws Exception
	 */
	public int update(MerchantFundsDataModel model) throws Exception;

	/**
	 * 根据id删除,大于等于1表示成功，其他失败
	 * 
	 * @param id
	 * @return
	 * @throws Exception
	 */
	public int delete(long id) throws Exception;

	/**
	 *  新增商户资金流水
	 * @param org_id
	 * @param price
	 * @param balance
	 * @param incomeEnum
	 * @param typeEnum
	 * @param ref_id
	 * @param refTableEnum
	 * @param currtime
	 * @throws Exception
	 */
	public void insertFundsData(Long org_id, Double price, Double balance, FundsIncomeEnum incomeEnum,
								MerchantFundsTypeEnum typeEnum, String ref_id, MerchantFundRefTabEnum refTableEnum,
								Long currtime)throws Exception;

}
